<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:layOut="http://www.w3.org/1999/xhtml" layOut:decorator="layOut/layOut">
<head>
    <title>404</title>
    <link rel="stylesheet" th:href="@{/pearAdminLayUI/admin/css/other/error.css}" />
    <!-- /pearAdminLayUI/view/document/card -->
</head>
<body class="pear-container">
<div class="layui-card">
    <div class="layui-card-body">
        <div id="currentTableId"></div>
    </div>
</div>
<script>
    layui.use(['jquery', 'form', 'layer', 'card'], function() {
        let $ = layui.jquery;
        let form = layui.form;
        let layer = layui.layer;
        let card = layui.card;

        card.render({
            elem: '#currentTableId',
            url: '/pearAdminLayUI/admin/data/card.json', // 接口数据
            data: [], // 静态数据
            page: true, // 是否分页
            limit: 8, // 每页数量
            linenum: 4, // 每行数量
            clickItem: function(data){ // 单击事件
                console.log(data)
            }
        })
        //选中数据
        form.on('submit(data-checked-btn)', function() {
            var data = card.getChecked("currentTableId");
            layer.msg(JSON.stringify(data));
            return false;
        });
        //数据
        form.on('submit(data-btn)', function() {
            var data = card.getAllData("currentTableId");
            layer.msg(JSON.stringify(data));
            return false;
        });
    })
</script>
</body>
</html>